<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../Vue.js/vue.js"></script>
</head>
<body>
    <div class="root">
        <h3>今天天气{{info}}</h3>
        <button @click = "click_change">点击我改变天气</button>
    </div>
</body>
<script>
    new Vue({
        el: ".root",
        data:{
            hot: true
        },
        methods: {
            click_change(){
                this.hot = !this.hot;
            }
        },
        computed:{
            info(){
                return this.hot?"热死了":"不热";
            }
        }
    })
</script>
</html>